]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Remove unused eslint-disable directives
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 18 Jun 2025 22:37:57 +0000 (00:37 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 28 Jun 2025 10:33:04 +0000 (12:33 +0200)
The 'camelcase' rule only applies to variables and properties,
not to function names or getter/setters.

The 'no-await-in-loop' rule only applies if there is a loop.

The 'require-atomic-updates' rule no longer applies to
properties by default.

The 'no-constant-condition' rule no longer applies to
`while(true)` by default.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3756>
(cherry picked from commit c70ba22bca57fb64a6e665da4b875288dc7a9706)

js/dbusServices/extensions/extensionPrefsDialog.js
js/ui/altTab.js
js/ui/background.js
js/ui/status/rfkill.js
tests/shell/basic.js
tests/shell/closeWithActiveWindows.js
tests/shell/core.js
tests/shell/headlessStart.js
tests/shell/hwtest.js

index 9a88397fd5bfa6120bc653ea9da1b4769757644e..75687c7a876d257378f6fb4b6733ddc8cfa20246 100644 (file)
@@ -46,7 +46,6 @@ export const ExtensionPrefsDialog = GObject.registerClass({
         this.set_titlebar(w);
     }
 
-    // eslint-disable-next-line camelcase
     set_titlebar() {
         // intercept fatal libadwaita error, show error page instead
         GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
index b2d87e34112e0c27af4fb8ee64c03642138307c9..9e6e15bbf53ae1d3a9adfdf1674fb2983c6f4467 100644 (file)
@@ -682,7 +682,6 @@ class AppIcon extends St.BoxLayout {
         this.add_child(this.label);
     }
 
-    // eslint-disable-next-line camelcase
     set_size(size) {
         this.icon = this.app.create_icon_texture(size);
         this._iconBin.child = this.icon;
index 130d451082b9574be5f1ed83c316d0dcc219b730..cee38f7dc05d57220c7279b3e11440e45ba3cc14 100644 (file)
@@ -661,7 +661,6 @@ class Animation extends GnomeBG.BGSlideShow {
         this.loaded = false;
     }
 
-    // eslint-disable-next-line camelcase
     load_async(cancellable, callback) {
         super.load_async(cancellable, () => {
             this.loaded = true;
index 96238cf8742db4ec7636c1717154a0a2e1ac4f56..1c47eda236529fc608c5536a1bd892308a7e5f67 100644 (file)
@@ -43,7 +43,6 @@ const RfkillManager = GObject.registerClass({
             .catch(e => console.error(e.message));
     }
 
-    /* eslint-disable camelcase */
     get airplane_mode() {
         return this._proxy.AirplaneMode;
     }
@@ -59,7 +58,6 @@ const RfkillManager = GObject.registerClass({
     get show_airplane_mode() {
         return this._proxy.HasAirplaneMode && this._proxy.ShouldShowAirplaneMode;
     }
-    /* eslint-enable camelcase */
 
     _changed(proxy, properties) {
         for (const prop in properties.deepUnpack()) {
index 34ee6a63e0b4c3f721848cd160d4c2f93778f366..221c8081f28246b1b4b7878779f9c4c3c7b101fd 100644 (file)
@@ -96,12 +96,10 @@ export async function run() {
 
     Scripting.scriptEvent('applicationsShowStart');
     console.debug('Showing applications');
-    // eslint-disable-next-line require-atomic-updates
     Main.overview.dash.showAppsButton.checked = true;
     await Scripting.waitLeisure();
     Scripting.scriptEvent('applicationsShowDone');
     console.debug('Hiding applications');
-    // eslint-disable-next-line require-atomic-updates
     Main.overview.dash.showAppsButton.checked = false;
     await Scripting.waitLeisure();
 
index d0adffad07ac8508dcb4d3d4b656272ecc4305a1..0c510fc45ec412ca529f29086351e6277fbb2dff 100644 (file)
@@ -7,8 +7,6 @@ import * as Scripting from 'resource:///org/gnome/shell/ui/scripting.js';
 
 /** Run test. */
 export async function run() {
-    /* eslint-disable no-await-in-loop */
-
     /* Make created windows remain visible during exit. */
     await Scripting.disableHelperAutoExit();
 
@@ -29,6 +27,4 @@ export async function run() {
     await Scripting.waitTestWindows();
     await Scripting.waitLeisure();
     await Scripting.sleep(1000);
-
-    /* eslint-enable no-await-in-loop */
 }
index 807bff820fa9e543b8b0aa56b3aa0fd6cf3324d3..c37caa635a9a9f8e515397ede6d25a4914204dc2 100644 (file)
@@ -153,11 +153,9 @@ export async function run() {
 
     for (let i = 0; i < 2; i++) {
         Scripting.scriptEvent('applicationsShowStart');
-        // eslint-disable-next-line require-atomic-updates
         Main.overview.dash.showAppsButton.checked = true;
         await Scripting.waitLeisure();
         Scripting.scriptEvent('applicationsShowDone');
-        // eslint-disable-next-line require-atomic-updates
         Main.overview.dash.showAppsButton.checked = false;
         await Scripting.waitLeisure();
     }
index e04f51837965604f2714b81e4afc3f530218845f..feae7ce6cfb5e3d4573662c5e7fc3d5f790c0b46 100644 (file)
@@ -48,7 +48,6 @@ export function init() {
  * run:
  */
 export async function run() {
-    /* eslint-disable no-await-in-loop */
     Scripting.defineScriptEvent('overviewShowDone', 'Overview finished showing');
     Scripting.defineScriptEvent('overviewHideDone', 'Overview finished hiding');
 
@@ -61,8 +60,6 @@ export async function run() {
 
     Main.overview.show();
     await Scripting.waitLeisure();
-
-    /* eslint-enable no-await-in-loop */
 }
 
 let monitorsChanged = false;
index 8ded32388a51311b81b4e1f8c0565da8b5bebfa0..35d60866706f051c84f3c823a0fb97b3fcfa9c9a 100644 (file)
@@ -97,7 +97,7 @@ function extractBootTimestamp() {
     let result = null;
 
     let datastream = Gio.DataInputStream.new(sp.get_stdout_pipe());
-    while (true) { // eslint-disable-line no-constant-condition
+    while (true) {
         let [line, length_] = datastream.read_line_utf8(null);
         if (line === null)
             break;
@@ -143,7 +143,6 @@ export async function run() {
     await Scripting.sleep(1000);
 
     Scripting.scriptEvent('applicationsShowStart');
-    // eslint-disable-next-line require-atomic-updates
     Main.overview.dash.showAppsButton.checked = true;
 
     await Scripting.waitLeisure();